package com.ruslan.magaz.service;

import java.util.List;
import org.springframework.data.domain.Page;
import org.springframework.transaction.annotation.Transactional;

import com.ruslan.magaz.entity.User;

public interface UserService {
	@Transactional
	void addUser(User user);
	
	@Transactional
	void removeUser (int id);
	
	@Transactional
	User getUserById(int id);
		
	@Transactional
    User updateUser(User user);
	
	@Transactional
	public Page<User> getUsers(int firstResult, Integer maxResults);
	
	@Transactional
	public int countSameUser(String firstName, String middleName, String lastName);
	
	@Transactional
	public int countIdenticalUsers(int id, String firstName, String middleName, String lastName);
	
	@Transactional
	public Page<User> getUsersForLetter(String letter,  int firstResult, Integer maxResults);
	
	@Transactional
	public List<String> getFirstLetters();
	

}
